Method for Testing Skin Texture, Method for Classifying Skin Texture and Device for Testing Skin Texture

ABSTRACT

The disclosure discloses a method for testing skin texture, a method for classifying skin texture and a device for testing skin texture. The method for testing skin texture includes: a face image is; a face complexion region and face feature points in the face image are acquired; and a face skin texture feature from the face image is acquired according to the face complexion region and the face feature points.

CROSS-REFERENCE TO RELATED APPLICATION

The disclosure claims the priority for Chinese Patent ApplicationPriority No. “201910292616. 3.”, filed to the Chinese Patent Office onDec. 4, 2019 and entitled “Method for Testing Skin Texture, Method forClassifying Skin Texture and Device for Testing Skin Texture”, which isincorporated herein in its entirety by reference.

TECHNICAL FIELD

The disclosure relates to computer vision processing technology, inparticular to a method for testing skin texture, a method forclassifying skin texture and a device for testing skin texture.

BACKGROUND

With development of society and improvement of living standards, peoplepay increasing attention to personal images, especially to skins.Generally speaking, for identifying some common defective skin texture,conventional manual observation is required, but for testing the skintexture more accurately, scientific means are required. At present,bioelectrical impedance analysis is mainly used to test skin texture,which evaluates skin texture by measuring electrical impedance featuresof the skins. However, the method can test a small number of skintexture features, such as moisture and fat secretion of the skins. Inaddition, a tester has to make contact with the skins directly, andtherefore, a testing result is greatly influenced by contact impedance,and testing precision is poor. Moreover, the method requires additionalprofessional hardware apparatuses, most of which can be operated byprofessionals and require users to complete testing in specific testingsites, and application groups and application scenes are limited to someextent consequently. These hardware apparatuses involve high cost, andtherefore are inconvenient to apply and promote in practice.

SUMMARY

According to one aspect of one of the embodiments of the disclosure, themethod for testing skin texture is provided. The method includes: a faceimage is acquired; a face complexion region and face feature points inthe face image are acquired; and a face skin texture feature from theface image is acquired according to the face complexion region and theface feature points.

In at least one alternative embodiment, the step that a face complexionregion and face feature points in the face image are acquired includes:the face complexion region is acquired by using a complexion testingalgorithm.

In at least one alternative embodiment, the method further includes:five sense organ regions of the face image are removed according to theface feature points, to acquire the face complexion region.

In at least one alternative embodiment, the method further includes: theface complexion region is processed by using a morphological algorithm,to expand the five sense organ regions removed.

In at least one alternative embodiment, the face skin texture featureincludes at least one of a complexion, a freckle, a pore, a wrinkle,under-eye dark circles and smoothness.

In at least one alternative embodiment, the step that a face skintexture feature from the face image is acquired according to the facecomplexion region and the face feature points includes: a detaileddiagram of the face complexion region is acquired by using a high passalgorithm.

In at least one alternative embodiment, the method further includes:face direction information is acquired according to the face featurepoints.

In at least one alternative embodiment, when the face skin texturefeature includes a freckle and/or a pore, the step that a face skintexture feature from the face image is acquired according to the facecomplexion region and the face feature points further includes: atesting result of the freckle and/or the pore in the detailed diagram isacquired by using a first preset algorithm; and the freckle and/or thepore is distinguished according to shape features.

In at least one alternative embodiment, when the face skin texturefeature includes the smoothness, the method includes: the smoothness isacquired through a gray level co-occurrence matrix algorithm accordingto the testing result of the freckle and/or the pore.

In at least one alternative embodiment, when the face skin texturefeature includes a wrinkle, the step that a face skin texture featurefrom the face image is acquired according to the face complexion regionand the face feature points further includes: a testing result of thewrinkle in the detailed diagram is acquired by using a second presetalgorithm; and a type of the wrinkle is determined according to facedirection information and the face feature points.

In at least one alternative embodiment, when the face skin texturefeature includes under-eye dark circles, a face skin texture featurefrom the face image according to the face complexion region and the facefeature points includes: according to eye feature points in the facefeature points, an upper Bezier curve and a lower Bezier curve in theface image are drew, the under-eye dark circles are located, and atesting result of the under-eye dark circles in the face image isacquired by determining a difference between a brightness mean ofpositions of the under-eye dark circles and a surrounding region.

In at least one alternative embodiment, the method for testing skintexture further includes: the face image is enhanced to acquire anenhanced face image.

In at least one alternative embodiment, the step that the face image isenhanced to acquire an enhanced face image includes: brightness of theface image are acquired; and contrast of a low gray level region in theface image is enhanced to acquire the enhanced face image.

In at least one alternative embodiment, the step that brightness of theface image are acquired includes: the face image is converted into animage in a YUV format through a color conversion algorithm, and a Ychannel image in the image in the YUV format is extracted to acquire thebrightness of the face image.

According to one aspect of one of the embodiments of the disclosure, themethod for classifying skin texture is provided. The method includes: aface skin texture feature is acquired by using the method for testingskin texture above; and face skin texture is classified into differentclasses by using a machine learning method according to the face skintexture feature.

In at least one alternative embodiment, the method includes:corresponding retouching parameters are set according to the differentclasses of the face skin texture.

In at least one alternative embodiment, the method is applied to anelectronic device with a video calling or photographing function.

According to another aspect of one of the embodiments of the disclosure,the device for testing skin texture is provided. The device includes: animage collection element configured to acquire a face image; anacquisition element configured to acquire a face complexion region andface feature points in the face image; and a skin texture testingelement configured to test a face skin texture feature from the faceimage according to the face complexion region and the face featurepoints.

In at least one alternative embodiment, the acquisition element includesa complexion acquisition element configured to acquire the facecomplexion region in the face image through a complexion testingalgorithm.

In at least one alternative embodiment, the complexion acquisitionelement is further configured to remove five sense organ regions of theface image according to the face feature points, to acquire the facecomplexion region.

In at least one alternative embodiment, the complexion acquisitionelement is further configured to process the face complexion region byusing a morphological algorithm, to expand the five sense organ regionsremoved.

In at least one alternative embodiment, the face skin texture featureincludes at least one of a complexion, a freckle, a pore, a wrinkle,under-eye dark circles and smoothness.

In at least one alternative embodiment, the skin texture testing elementis further configured to acquire a detailed diagram of the facecomplexion region by using a high pass algorithm.

In at least one alternative embodiment, the skin texture testing elementis further configured to acquire face direction information according tothe face feature points.

In at least one alternative embodiment, the skin texture testing elementincludes a freckle and pore testing element, and the freckle and poretesting element is configured to acquire a testing result of a freckleand/or a pore in the detailed diagram by using a first preset algorithm,and distinguish the freckle and/or the pore according to shape features.

In at least one alternative embodiment, the skin texture testing elementincludes the smoothness testing element configured to acquire smoothnessthrough a gray level co-occurrence matrix algorithm according to thetesting result of the freckle and/or the pore.

In at least one alternative embodiment, the skin texture testing elementincludes a wrinkle testing element configured to acquire a testingresult of a wrinkle in the detailed diagram by using a second presetalgorithm, and determine a type of the wrinkle according to facedirection information and the face feature points.

In at least one alternative embodiment, the skin texture testing elementincludes an under-eye dark circles testing element configured to draw,according to eye feature points in the face feature points, an upperBezier curve and a lower Bezier curve in the face image, locate theunder-eye dark circles, and acquire a testing result of the under-eyedark circles in the face image by determining a difference between abrightness mean of positions of the under-eye dark circles and asurrounding region.

In at least one alternative embodiment, the device further includes animage enhancement element configured to enhance the face image toacquire an enhanced face image.

In at least one alternative embodiment, the image enhancement elementincludes a brightness acquiring unit configured to acquire brightness ofthe face image; and a contrast enhancement unit configured to enhancecontrast of a low gray level region in the face image to acquire theenhanced face image.

In at least one alternative embodiment, the brightness acquiring unit isfurther configured to convert the face image into an image in a YUVformat through a color conversion algorithm, and extract a Y channelimage in the image in the YUV format to acquire the brightness of theface image.

According to another aspect of one of the embodiments of the disclosure,an electronic device is provided. The electronic device includes: aprocessor, and a memory configured to store an executable command of theprocessor, wherein the processor is configured to execute the executablecommand to implement the method for testing skin texture according toany one described above.

According to another aspect of one of the embodiments of the disclosure,a storage medium is provided. The storage medium includes a storedprogram, wherein when being run, the program controls a device where thestorage medium is located to implement the method for testing skintexture according to any one described above.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings described herein are used for providingfurther understanding of the disclosure and constitute part of thedisclosure. Schematic embodiments of the disclosure and descriptionsthereof are used to explain the disclosure, but not constitute animproper limit to the disclosure. In the accompanying drawings:

FIG. 1 is a flowchart of an optional method for testing skin textureaccording to one of embodiments of the disclosure;

FIG. 2 is a flowchart of an optional method for classifying skin textureaccording to one of the embodiments of the disclosure;

FIG. 3 is a structural block diagram of an optional device for testingskin texture according to one of the embodiments of the disclosure; and

FIG. 4 is a structural block diagram of an optional electronic deviceaccording to one of the embodiments of the disclosure.

DETAILED DESCRIPTION OF THE EMBODIMENTS

In order to enable a person of ordinary skill in the art to betterunderstand solutions of the disclosure, the following clearly andcompletely describe the technical solutions in the embodiments of thedisclosure with reference to the accompanying drawings in theembodiments of the disclosure. Apparently, the described embodiments aresome rather than all of the embodiments of the disclosure. All otherembodiments obtained by a person of ordinary skill in the art based onthe described embodiments of the disclosure shall fall within theprotection scope of the disclosure.

It should be noted that the terms “first”, “second”, etc. in thespecification and claims of the disclosure and the above accompanyingdrawings are used to distinguish similar objects, but are notnecessarily used to describe a specific sequence or a precedence order.It should be understood that data used in this way can be interchangedunder appropriate circumstances, such that the embodiment of thedisclosure described herein may be implemented in a sequence other thanthose illustrated or described herein. In addition, terms “including”,“having”, and any variations thereof are intended to cover non-exclusiveinclusions, for example, processes, methods, systems, products, ordevices that contain a series of steps or units need not be limited tothose clearly listed steps or units, but may include other steps orunits not explicitly listed or inherent to the processes, methods,products, or devices.

The embodiments of the disclosure may be applied to computesystems/servers that may operate with numerous other general purpose orspecial purpose computing system environments or configurations.Examples of well-known computing systems, environments, and/orconfigurations suitable for use with the computer systems/serversinclude, but are not limited to, personal computer systems, handheld orlaptop devices, microprocessor-based systems, programmable consumerelectronics products, small computer systems, large computer systems,distributed cloud computing technology environments including any of theabove systems, etc.

The computer systems/servers may be described in the general context ofcomputer system executable instructions (such as program elements)executed by the computer systems. Generally, program elements mayinclude routines, programs, object programs, components, logic and datastructures, etc., which perform specific tasks or implement specificabstract data types. The computer systems/servers may be implemented inthe distributed cloud computing environments, and tasks are performed byremote processing devices linked through a communication network. In thedistributed cloud computing environments, the program elements may belocated on local or remote computing system storage media includingstorage devices.

The following describes the disclosure through detailed embodiments.

According to one aspect of the disclosure, a method for testing skintexture is provided. FIG. 1 is a flowchart of an optional method fortesting skin texture according to one of embodiments of the disclosure.As shown in FIG. 1, the method includes the following steps:

S10: a face image is acquired;

S12: a face complexion region and face feature points in the face imageare acquired; and

S14: a face skin texture feature from the face image is acquiredaccording to the face complexion region and the face feature points.

In this embodiment of the disclosure, the method includes the followingsteps: the face image is acquired; the face complexion region and theface feature points in the face image are acquired; and the face skintexture feature from the face image is acquired according to the facecomplexion region and the face feature points. In this way, the faceskin texture feature may be tested on the basis of the face image, andmore skin texture features may be tested as needed without increasing acost and a size of hardware, thus improving testing precision.

Each step above is described in detail below.

S10, the face image is acquired.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the face image may be acquired through an image collectionelement, the image collection element may be an independent camera heador a camera head integrated on an electronic device, such as anindependent RGB camera, or a built-in camera of an on-board electronicdevice (including but not limited to a touch screen, a navigator, etc.),a mobile phone, a tablet computer, a desktop computer, a skin texturetesting instrument, etc.

S12: the face complexion region and the face feature points in the faceimage are acquired.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the face complexion region in the face image may be acquiredthrough a complexion testing algorithm. For example, the face image maybe converted into a YCbCr color space through the complexion testingalgorithm, then a CrCb value of each pixel point is put into an ellipticstatistical model acquired according to skin pixels, if a coordinate ofthe CrCb is located in the elliptic statistical model, the pixel pointsis determined as a complexion, through which the face complexion regionis acquired. The face feature points may be acquired by a superviseddescent method (SDM) algorithm.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, in order to acquire a more accurate face complexion region,five sense organ regions in the face image may be removed according tothe face feature points, to acquire the face complexion region. Inaddition, a morphological algorithm (for example, a corrosion expansionalgorithm) may also be utilized to process the face complexion region,so as to expand the removed five sense organ regions, thus avoiding theproblem that the five sense organ regions are not completely removed andremain due to image offset.

S14: the face skin texture feature from the face image is acquiredaccording to the face complexion region and the face feature points.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the face skin texture feature includes at least one of acomplexion, a freckle, a pore, a wrinkle, under-eye dark circles andsmoothness.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, when the face skin texture feature includes a freckle and/ora pore, the step that the face skin texture feature from the face imageis acquired according to the face complexion region and the face featurepoints includes: a detailed diagram of the face complexion region isacquired by using a high pass algorithm, a testing result of the freckleand/or the pore in the detailed diagram is acquired by using a firstpreset algorithm (for example, a local adaptive threshold algorithm),the testing result including at least one of a position, the number andan area; and the freckle and/or the pore is distinguished according toshape features, wherein shape features of the pore are in a shapesimilar to a circle with a generally small area, and shape features ofthe freckle are in a shape with a relatively large area. Preferably,after the testing result of the freckle and/or the pore in the detaileddiagram is acquired by using the local adaptive threshold algorithm,isolated points of the freckle and/or the pore may be removed by usingthe morphological algorithm (for example, the corrosion expansionalgorithm) to eliminate influence of noise, and a connected domainalgorithm is used to eliminate wrong points with an abnormal shape or anexcessively large area in an initial testing result. Preferably, theabove step may be implemented in the face complexion region with thefive sense organ regions removed, so as to reduce a false testing rateof the freckle and/or the pore.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, after the testing result of the freckle and/or the pore isacquired, the smoothness may be acquired through a gray levelco-occurrence matrix algorithm according to the testing result of thefreckle and/or the pore. For example, parameters such as energy,entropy, contrast and inverse difference moment at degree, 45 degrees,90 degrees and 135 degrees are calculated through the gray levelco-occurrence matrix algorithm, and then the smoothness feature isacquired with the 16 parameters.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, when the face skin texture feature includes a wrinkle, aface skin texture feature from the face image is acquired according tothe face complexion region and the face feature points further includes:a detailed diagram of the face complexion region is acquired by using ahigh pass algorithm, face direction information is acquired according tothe face feature points, a testing result of the wrinkle in the detaileddiagram is acquired by using a second preset algorithm, and a type ofthe wrinkle is determined according to the face direction informationand the face feature points. The testing result includes at least one ofa position, the number and an area. Preferably, after the second presetalgorithm is used to acquire the testing result of the wrinkle in thedetailed diagram, the morphological algorithm and the connected domainalgorithm are used to eliminate some objects which obviously do notbelong to the wrinkle.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the steps that the testing result of the wrinkle in thedetailed diagram of the wrinkle is acquired by using the second presetalgorithm, and a type of the wrinkle is determined according to the facedirection information and the face feature points may include: aposition of a wrinkle is acquired by using the local adaptive thresholdalgorithm, a wrinkle which is generally in a horizontal direction isdetermined as a periocular wrinkle according to the face feature pointsand the face direction information, a position of a wrinkle is acquiredby using a Canny edge extraction algorithm, and according to the facefeature points and the face direction information, a wrinkle which isgenerally in a horizontal direction is determined as a forehead wrinkleand a wrinkle which is generally in a diagonal direction is determinedas a nasolabial wrinkle.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, when the face skin texture feature includes under-eye darkcircles, the step that a face skin texture feature from the face imageis acquired according to the face complexion region and the face featurepoints further includes: according to eye feature points in the facefeature points, an upper Bezier curve and a lower Bezier curve are drewin the face image, testing regions of the under-eye dark circles arelocated, a difference between a brightness mean of the testing regionsof the under-eye dark circles and a surrounding region is calculated andseverity of the under-eye dark circles is determined.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, after the step S10 acquiring the face image, the methodfurther includes step S11: the face image is enhanced to acquire anenhanced face image.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the step that the face image is enhanced to acquire anenhanced face image includes: brightness of the face image are acquiredthrough a third preset algorithm; and contrast of a low gray levelregion is enhanced in the face image to acquire an enhanced face image.Therefore, details of the face image in dark light may be enhanced.Preferably, the face skin texture feature may be acquired from theenhanced face image to acquire a more accurate testing result. A lowgray level region in the face image may be expanded through methodsincluding but not limited to logarithmic transformation, histogramequalization, exponential transformation, etc.

Specifically, the step that brightness of the face image are acquiredthrough a third preset algorithm includes: the face image is convertedinto an image in a YUV format through a color conversion algorithm, anda Y channel image in the image in the YUV format is extracted to acquirethe brightness of the face image.

It is certain that those skilled in the art know that before or afterthe face image is enhanced to acquire the enhanced face image, themethod may also include a face frame is tested and the image is scaledaccording to a tested size of the face frame, so as to acquire the faceimage with a required size.

Through the above steps, face skin texture testing may be realized, andthe tested skin texture feature may include the freckle, the pore, thesmoothness, the wrinkle, the under-eye dark circles, etc., and thetesting precision may be improved without increasing the cost and thesize of the hardware.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, after various skin texture features are tested, skin texturemay also be evaluated by combining with the face complexion region. Forexample, in the case of the freckle, an area ratio of the freckle to theface complexion regions may be used as an index to evaluate severity ofthe freckle.

According to another aspect of one of embodiments of the disclosure, amethod for classifying skin texture is further provided. FIG. 2 is aflowchart of an optional method for classifying skin texture accordingto one of embodiments of the disclosure. As shown in FIG. 2, the methodincludes the following steps:

S20: a face skin texture feature is acquired by using the method fortesting skin texture above; and

S22: face skin texture is classified into different classes by using amachine learning method according to the face skin texture feature.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the machine learning method may use a support vector machineor a perceptron. Specifically, the machine learning method may acquirean optimal classification function by training samples, wherein a faceskin texture feature of each sample includes at least one of acomplexion, a freckle, a pore, a wrinkle, under-eye dark circles andsmoothness.

In one of the embodiments of the disclosure, the face skin texturefeature is acquired through the above steps, that is, the above methodfor testing skin texture. According to the face skin texture feature,face skin texture is classified into different classes by using themachine learning method. In addition to testing of the face skin texturefeature, the face skin texture may be classified into different classes,which facilitates supplying of nursing advice and recommending ofsuitable skin care products to different users or realizing ofintelligent retouching.

With regard to intelligent retouching, in an application scene of one ofthe embodiments of the disclosure, corresponding retouching parametersmay be set according to the different classes of the face skin texture,to realize intelligent retouching. For example, if a skin of somebodyhas many pores, wrinkles and freckles, and is relatively rough, faceskin texture of the person is defined as bad, corresponding retouchingparameters may be set accordingly, and for example, higher skinsmoothing intensity in the retouching parameters may be set. On thecontrary, if a skin of somebody has fewer pores, wrinkles and freckles,and is smooth, face skin texture of the person is defined as good,corresponding retouching parameters may be set accordingly, for example,lower skin smoothing intensity in the retouching parameters may be set,thereby guaranteeing that retouching parameters of each person areoptimized, achieving a natural retouching effect and realizingintelligent retouching. The intelligent retouching technology realizedby setting the corresponding retouching parameters according to thedifferent classes of the face skin texture may be carried on anelectronic device with a function such as video calling orphotographing, such as an on-board electronic device (including but notlimited to a touch screen, a navigator, etc.), a mobile phone, a digitalcamera, a tablet computer, a desktop computer, a skin texture testinginstrument, etc. In an application environment, for example, in a carwith an auxiliary driving function, especially in a car with anautomatic driving function, because people don't need to operate asteering wheel when driving, people may have video chats, videoconferences, photo taking, etc. in spare time, and by carrying theintelligent retouching technology on the above on-board electronicdevice with the video calling or the photo taking function, experiencefeeling of users may be improved.

According to another aspect of one of the embodiments of the disclosure,a device for testing skin texture is further provided. FIG. 3 is astructural block diagram of an optional device for testing skin textureaccording to one of embodiments of the disclosure. As shown in FIG. 3,the device for testing skin texture includes:

an image collection element 30 is configured to acquire a face image.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the image collection element may be an independent camerahead or a camera head integrated on an electronic device, such as anindependent RGB camera, or a built-in camera of an electronic devicesuch as a mobile phone, a tablet computer, a desktop computer and a skintexture testing instrument.

An acquisition element 32 is configured to acquire a face complexionregion and face feature points in the face image.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the acquisition element 34 includes a complexion acquisitionelement and a feature points acquisition element. The complexionacquisition element is configured to acquire the face complexion regionin the face image through a complexion testing algorithm. For example,the face image may be converted into a YCbCr color space through thecomplexion testing algorithm, then a CrCb value of each pixel point isput into an elliptic statistical model acquired according to skinpixels, if a coordinate of the CrCb is located in the ellipticstatistical model, the pixel point is determined as a complexion,through which the face complexion region is acquired. The face featurepoints may be acquired by a supervised descent method (SDM) algorithm.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, in order to acquire a more accurate face complexion region,the complexion acquisition element is configured to remove five senseorgan regions in the face image according to the face feature points, toacquire the face complexion region. In addition, the complexionacquisition element is configured to utilize a morphological algorithm(for example, a corrosion expansion algorithm) to process the facecomplexion region, so as to expand the removed five sense organ regions,thus avoiding the problem that the five sense organ regions are notcompletely removed and remain due to image offset.

A skin texture testing element 34 is configured to acquire a face skintexture feature from the face image according to the face complexionregion and the face feature points.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the face skin texture feature includes at least one of acomplexion, a freckle, a pore, a wrinkle, under-eye dark circles andsmoothness.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the skin texture testing element 34 includes a freckle andpore testing element 340. The freckle and pore testing element 340 isconfigured to acquire a detailed diagram of the face complexion regionby using a high pass algorithm, acquire a testing result of the freckleand/or the pore in the detailed diagram by using a first presetalgorithm (for example, a local adaptive threshold algorithm), thetesting result including at least one of a position, the number and anarea; and distinguish the freckle and/or the pore according to shapefeatures, wherein shape features of the pore are in a shape similar to acircle with a generally small area, and shape features of the freckleare in a shape with a relatively large area. Preferably, after thetesting result of the freckle and/or pore in the detailed diagram isacquired by using the local adaptive threshold algorithm, isolatedpoints of the freckle and/or pore may be removed by using themorphological algorithm (for example, the corrosion expansion algorithm)to eliminate influence of noise, and a connected domain algorithm isused to eliminate wrong points with an abnormal shape or an excessivelylarge area in an initial testing result. Preferably, the above step maybe implemented in the face complexion region with the five sense organregions removed, so as to reduce a false testing rate of the freckleand/or the pore.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the skin texture testing element 34 includes a smoothnesstesting element 342 which is configured to acquire, after the testingresult of the freckle and/or the pore is acquired, the smoothnessthrough a gray level co-occurrence matrix algorithm according to thetesting result of the freckle and/or the pore. For example, parameterssuch as energy, entropy, contrast and inverse difference moment at 0degree, 45 degrees, 90 degrees and 135 degrees are calculated throughthe gray level co-occurrence matrix algorithm, and then the smoothnessfeature is acquired with the 16 parameters.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the skin texture testing element 34 includes a wrinkletesting element 344. The wrinkle testing element 344 is configured toacquire a detailed diagram of the face image by using a high passalgorithm, acquire face direction information according to the facefeature points, acquire a testing result of the wrinkle in the detaileddiagram by using a second preset algorithm, the testing result includingat least one of a position, the number and an area, and determine a typeof the wrinkle according to the face direction information and the facefeature points. Preferably, after the second preset algorithm is used toacquire the testing result of the wrinkle in the detailed diagram, themorphological algorithm and the connected domain algorithm are used toeliminate some objects which obviously do not belong to the wrinkle.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the steps that the testing result of the wrinkle in thedetailed diagram of the wrinkle is acquired by using the second presetalgorithm, and a type of the wrinkle is determined according to the facedirection information and the face feature points may include: aposition of a wrinkle is acquired by using the local adaptive thresholdalgorithm, mark a wrinkle which is generally in a horizontal directionis determined as a periocular wrinkle according to the face directioninformation and the face feature points, acquire a position of a wrinkleby using a Canny edge extraction algorithm, and according to the facedirection information and the face feature points, a wrinkle which isgenerally in a horizontal direction is marked as a forehead wrinkle anda wrinkle which is generally in a diagonal direction is marked as anasolabial wrinkle.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the skin texture testing element 34 includes an under-eyedark circle testing element 346. The under-eye dark circle testingelement 346 is configured to draw, according to eye feature points inthe face feature points, an upper Bezier curve and a lower Bezier curvein the face image, locate testing regions of the under-eye dark circles,calculate a difference between a brightness mean of the testing regionsof the under-eye dark circles and a surrounding region and determineseverity of the under-eye dark circles.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the device for testing skin texture 3 further includes animage enhancement element 31 configured to enhance the face image toacquire an enhanced face image.

In at least one alternative embodiment, in one of the embodiments of thedisclosure, the image enhancement element 31 includes a brightnessacquiring unit 310 and a contrast enhancement unit 312. The brightnessacquiring unit 310 is configured to acquire brightness of the face imagethrough a third preset algorithm. The contrast enhancement unit 312 isconfigured to enhance contrast of a low gray level region in the faceimage to acquire the enhanced face image. Therefore, details of the faceimage in dark light may be enhanced. Preferably, the face skin texturefeature may be acquired from the enhanced face image to acquire a moreaccurate testing result. A low gray level region in the face image maybe expanded through methods including but not limited to logarithmictransformation, histogram equalization, exponential transformation, etc.

Specifically, the step that brightness of the face image are acquiredthrough a third preset algorithm includes: the face image is convertedinto an image in a YUV format through a color conversion algorithm, anda Y channel image in the image in the YUV format is extracted to acquirethe brightness of the face image.

It is certain that those skilled in the art know that before or afterthe face image is enhanced to acquire the enhanced face image, themethod may also include the image is scaled to acquire the face imagewith a required size.

In one of the embodiments of the disclosure, the above elements, thatis, the image collection element 30 is configured to acquire the faceimage, the acquisition element 34 is configured to acquire the facecomplexion region and the face feature points in the face image; and theskin texture testing element 36 is configured to test the face skintexture feature of the face image according to the face complexionregion and the face feature points. In this way, various face skintexture features may be tested on the basis of the face image, and moreskin texture features may be tested as needed without increasing a costand a size of hardware, thus improving testing precision.

According to another aspect of one of the embodiments of the disclosure,an electronic device is further provided. The electronic device 40includes a processor 400 and a memory 402 configured to store anexecutable command of the processor 400, wherein the processor 400 isconfigured to execute the executable command to implement the method fortesting skin texture according to any one described above.

According to another aspect of one of the embodiments of the disclosure,a storage medium is further provided. The storage medium includes astored program, wherein when being run, the program controls a devicewhere the storage medium is located to implement the method for testingskin texture according to any one described above.

In the above embodiments of the disclosure, descriptions of theembodiments have their own emphasis. For part not detailed in a certainembodiment, reference may be made to the relevant descriptions of otherembodiments.

It should be understood that in several embodiments provided by thedisclosure, technical contents disclosed may be implemented in othermanners. The device embodiments described above are merely schematic.For example, unit division may be a logical function division and mayhave other division manners during actual implementation, for example,multiple units or components may be combined or integrated into anothersystem, or some features may be ignored or not executed. On the otherhand, the shown or discussed coupling or direct coupling orcommunication connection with each other may be indirect coupling orcommunication connection through some interfaces, units or elements, andmay be in electrical or other forms.

The units described as separated parts may or may not be physicallyseparated, and the parts displayed as units may or may not be physicalunits, that is, they may be located in one place or distributed tomultiple units. Some or all of the units may be selected according toactual needs to achieve the purpose of a solution of this embodiment.

In addition, functional units in the embodiments of the disclosure maybe integrated into one processing unit, or each unit may be physicallypresent separately, or two or more units may be integrated into oneunit. The above integrated units may be implemented in the form ofhardware, or may be implemented in the form of software functionalunits.

If the integrated units are implemented in the form of the softwarefunctional units and sold or used as independent products, they may bestored in a computer readable storage medium. Based on suchunderstanding, a technical solution of the disclosure may be embodied inthe form of software products in essence or in part that contributes tothe prior art or in part or whole, the computer software products arestored in the storage medium, and include several instructions to makeone piece of computer equipment (which may be a personal computer, aserver, a network device, etc.) execute whole or partial steps of themethod of each embodiment of the disclosure. The foregoing storagemedium includes a USB flash drive, a read-only memory (ROM), a randomaccess memory (RAM), a mobile hard disk drive, a diskette or opticaldisk, etc., which may store program codes.

The described above is merely a preferred embodiment of the disclosure.It shall be noted that for those of ordinary skill in the art, they maymake several improvements and polishing on the premise without deviatingfrom a principle of the disclosure, and these improvements and polishingshall be integrated as falling within the protection scope of thedisclosure.

INDUSTRIAL APPLICABILITY

The face image is acquired, the face complexion region and the facefeature points in the face image are acquired; and the face skin texturefeature of the face image is acquired according to the face complexionregion and the face feature points. The face skin texture feature may betested on the basis of the face image, and more skin texture featuresmay be tested as needed without increasing the cost and the size of thehardware, thus improving the testing precision, and further solving theproblems of a small number of skin texture features tested, poor testingprecision, and a high cost and a large size of hardware in the priorart.

What is claimed is:
 1. A method for testing skin texture, comprising:acquiring a face image; acquiring a face complexion region and facefeature points in the face image; and acquiring a face skin texturefeature from the face image according to the face complexion region andthe face feature points.
 2. The method as claimed in claim 1, whereinacquiring the face complexion region and the face feature points in theface image comprises: acquiring the face complexion region by using acomplexion testing algorithm.
 3. The method as claimed in claim 1,further comprising: removing five sense organ regions of the face imageaccording to the face feature points, to acquire the face complexionregion.
 4. The method as claimed in claim 3, further comprising:processing the face complexion region by using a morphologicalalgorithm, to expand a coverage of the five sense organ regions removed.5. (canceled)
 6. (canceled)
 7. (canceled)
 8. The method as claimed inclaim 1, wherein the acquiring, when the face skin texture featurecomprises the freckle, the face skin texture feature from the face imageaccording to the face complexion region and the face feature pointsfurther comprises: acquiring a detailed diagram of the face complexionregion by using a high pass algorithm; acquiring a testing result of thefreckle in the detailed diagram by using a first preset algorithm,wherein the testing result including at least one of a position, thenumber and an area; and distinguishing the freckle according to shapefeatures of the freckle.
 9. The method as claimed in claim 8, whereinwhen the face skin texture feature comprises smoothness, the methodcomprises: acquiring the smoothness through a gray level co-occurrencematrix algorithm according to the testing result of the freckle.
 10. Themethod as claimed in claim 1, wherein the acquiring, when the face skintexture feature comprises the wrinkle, the face skin texture featurefrom the face image according to the face complexion region and the facefeature points further comprises: acquiring a detailed diagram of theface complexion region by using a high pass algorithm; acquiring facedirection information according to the face feature points; acquiring atesting result of the wrinkle in the detailed diagram by using a secondpreset algorithm; and determining a type of the wrinkle according to thetesting result of the wrinkle, face direction information and the facefeature points.
 11. The method as claimed in claim 1, wherein theacquiring, when the face skin texture feature comprises under-eye darkcircles, the face skin texture feature from the face image according tothe face complexion region and the face feature point comprises:drawing, according to eye feature points in the face feature points, anupper Bezier curve and a lower Bezier curve in the face image, locatingthe under-eye dark circles, and acquiring a testing result of theunder-eye dark circles in the face image by determining a differencebetween a brightness mean of positions of the under-eye dark circles anda surrounding region.
 12. The method as claimed in claim 1, furthercomprising: enhancing the face image to acquire an enhanced face image.13. The method as claimed in claim 12, wherein the enhancing the faceimage to acquire the enhanced face image comprises: acquiring brightnessof the face image; and enhancing contrast of a low gray level region inthe face image according to the brightness to acquire the enhanced faceimage.
 14. The method as claimed in claim 13, wherein the acquiringbrightness of the face image comprises: converting the face image intoan image in a YCbCr format through a color conversion algorithm, andextracting a Y channel image in the image in the YCbCr format to acquirethe brightness of the face image.
 15. A method for classifying skintexture, comprising: acquiring a face skin texture feature by using themethod for testing skin texture of claim 1; and classifying face skintexture into different classes by using a machine learning methodaccording to the face skin texture feature.
 16. The method as claimed inclaim 15, further comprising: setting corresponding retouchingparameters according to different classes of the face skin texture. 17.The method as claimed in claim 16, wherein the method is applied to anelectronic device with a video calling or photographing function.
 18. Adevice for testing skin texture, comprising: an image collection elementconfigured to acquire a face image; an acquisition element configured toacquire a face complexion region and a face feature points in the faceimage; and a skin texture testing element configured to test a face skintexture feature from the face image according to the face complexionregion and the face feature points.
 19. The device as claimed in claim18, wherein the acquisition element comprises a complexion acquisitionelement configured to acquire the face complexion region in the faceimage through a complexion testing algorithm.
 20. (canceled) 21.(canceled)
 22. (canceled)
 23. (canceled)
 24. (canceled)
 25. (canceled)26. (canceled)
 27. (canceled)
 28. (canceled)
 29. (canceled) 30.(canceled)
 31. (canceled)
 32. (canceled)
 33. (canceled)
 34. The methodas claimed in claim 1, wherein the acquiring, when the face skin texturefeature comprises the pore, the face skin texture feature from the faceimage according to the face complexion region and the face featurepoints further comprises: acquiring a detailed diagram of the facecomplexion region by using a high pass algorithm; acquiring a testingresult of the pore in the detailed diagram by using a first presetalgorithm, wherein the testing result including at least one of aposition, the number and an area; and distinguishing the pore accordingto shape features of the pore.
 35. The method as claimed in claim 34,wherein when the face skin texture feature comprises smoothness, themethod comprises: acquiring the smoothness through a gray levelco-occurrence matrix algorithm according to the testing result of thepore.
 36. The method as claimed in claim 1, wherein the acquiring, whenthe face skin texture feature comprises the freckle and the pore, theface skin texture feature from the face image according to the facecomplexion region and the face feature points further comprises:acquiring a detailed diagram of the face complexion region by using ahigh pass algorithm; acquiring a testing result of the freckle and thepore in the detailed diagram by using a first preset algorithm, whereinthe testing result including at least one of a position, the number andan area; and distinguishing the freckle and the pore according to shapefeatures of the freckle and the pore.
 37. The method as claimed in claim36, wherein when the face skin texture feature comprises smoothness, themethod comprises: acquiring the smoothness through a gray levelco-occurrence matrix algorithm according to the testing result of thefreckle and the pore.